﻿namespace _4_NovaAdmin.Web.Core.AspectsHub.Attributes;

/// <summary>
/// AOP基类
/// 注:不支持控制器,需要定义接口并实现接口，自定义AOP特性放到接口实现类或者自定义类上
/// </summary>
public abstract class BaseAspectAttribute : Attribute
{

    /// <summary>
    /// 方法执行前
    /// </summary>
    /// <param name="context"></param>
    /// <returns></returns>
    public virtual async Task Befor(IAspectContext context)
    {
        await Task.CompletedTask;
    }

    /// <summary>
    /// 方法执行后
    /// </summary>
    /// <param name="context"></param>
    /// <returns></returns>
    public virtual async Task After(IAspectContext context)
    {
        await Task.CompletedTask;
    }
}
